package net.csdn.business.kanban.common.entity;

import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import lombok.Getter;
import lombok.Setter;

import java.io.Serializable;
import java.util.Date;

/**
 *  @author: zhangyalei
 *  @Date: 2021/11/2 11:04
 *  @Description: SuperEntity
 */
@Getter
@Setter
public class SuperEntity<T extends Model<?>> extends Model<T> {
    /**
     * 主键ID
     */
    @TableId(type = IdType.AUTO)
    protected Long id;


    @TableField(fill = FieldFill.INSERT)
    protected String createdBy;


    @TableField(fill = FieldFill.INSERT_UPDATE)
    protected String lastModifiedBy;


    @TableField(fill = FieldFill.INSERT)
    protected Date createdDate;


    @TableField(fill = FieldFill.INSERT_UPDATE)
    protected Date lastModifiedDate;


    @Override
    public Serializable pkVal() {
        return this.id;
    }
}